Attributed Variables for Dynamic Constraint Solving

نویسنده

  • Armin Wolf
چکیده

Armin Wolf Fraunhofer Gesells haft Institute for Computer Ar hite ture and Software Te hnology (FIRST) Kekul estra e 7, D-12489 Berlin, Germany Armin.Wolf first.fraunhofer.de http://www.first.fraunhofer.de Abstra t Attributed variables are an approved te hnique for onstraint storage and retrieval. They provide a means of asso iating arbitrary attributes that an be used to extend the uni ation in logi programming language implementations and were primarily designed as a lean interfa e between Prolog and onstraint solvers. However, this widely used state-of-the-art method is inappropriate if variable bindings and unbindings o ur in an arbitrary order, espe ially during dynami onstraint pro essing. In this paper, a new extended s hema of attributed variables is presented that eÆ iently supports arbitrary variable bindings and unbindings. In addition, its use and adequa y for dynami onstraint pro essing is disussed. 1 Introdu tion DJCHR { dynami onstraint handling in Java [3℄ { is a re ent implementation of Constraint Handling Rules (CHR) in Java that supports dynami onstraint pro essing and thus opens up new appli ation areas of CHR, like dynami ba ktra king or loal sear h. Dynami onstraint handling with CHR means that a dynami ally hanging set of symboli onstraints (i.e. predi ates) is transformed by rule appli ation, eventually resulting in a simpli ed representation. For instan e, the rules less(A,B), less(B,C) ==> less(A,C) and less(A,A) <=> false are not able to transform the onstraints less(a,X), less(Y,a). However, if the synta ti al equation X=Y is added and X is bound to Y, then the onstraints are transformed to less(a,Y), less(Y,a), X=Y, less(a,a) and further to less(a,Y), less(Y,a), X=Y, false. If one of the given onstraints is deleted, both rule appli ations have to be undone. For eÆ ient rule appli ations, ea h onstraint is implemented as both ode and data, i.e. an entry in the onstraint store. Whenever a CHR onstraint is added (exe uted) or re-a tivated (re-exe uted), the appli ability of the CHR that ontains the exe uted onstraint in its heads is he ked. Su h a onstraint is alled a tive; all other onstraints in the onstraint store are alled passive. Among other things, it must be he ked whether the a tive onstraint mat hes one of the rule's heads and whether there are passive partner onstraints that mat h the other heads. Like others [2℄, we believe that the real hallenge in implementing multi-headed CHR is eÆ iently omputing potential partner onstraints. A naive solution is to onsider all other onstraints. However, if there are shared variables in the heads, only a subset has to be onsidered. For instan e, the transitivity rule less(A,B), less(B,C) ==> less(A,C), whi h has to be tried against all a tive onstraints less(u, v) only those \less" onstraints have to be onsidered as potential partners that have either v in their rst argument position or u in their se ond. In order to (partially) apply this knowledge, the idea of variable indexing ( .f. [2℄) is used. Here, the partner sear h is better fo used if the arguments of the a tive onstraints are variables, e.g. if u and v are variables. The onstraints in the store are therefore distributed over all variables that o ur in these onstraints. The onstraints are atta hed to their variables as attribute values ( .f. [1℄). The attributes are named after the onstraints. For efient O(1) a ess, onstraint symbols are mapped to array indi es. The onstraints with the same symbols are stored under the same index. X: attr val

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Efficient Algorithm for Reducing the Duality Gap in a Special Class of the Knapsack Problem

A special class of the knapsack problem is called the separable nonlinear knapsack problem. This problem has received considerable attention recently because of its numerous applications. Dynamic programming is one of the basic approaches for solving this problem. Unfortunately, the size of state-pace will dramatically increase and cause the dimensionality problem. In this paper, an efficient a...

متن کامل

An Efficient Algorithm for Reducing the Duality Gap in a Special Class of the Knapsack Problem

A special class of the knapsack problem is called the separable nonlinear knapsack problem. This problem has received considerable attention recently because of its numerous applications. Dynamic programming is one of the basic approaches for solving this problem. Unfortunately, the size of state-pace will dramatically increase and cause the dimensionality problem. In this paper, an efficient a...

متن کامل

A dynamic programming approach for solving nonlinear knapsack problems

Nonlinear Knapsack Problems (NKP) are the alternative formulation for the multiple-choice knapsack problems. A powerful approach for solving NKP is dynamic programming which may obtain the global op-timal solution even in the case of discrete solution space for these problems. Despite the power of this solu-tion approach, it computationally performs very slowly when the solution space of the pr...

متن کامل

Using Attributed Variables in the Implementation of Concurrent and Parallel Logic Programming Systems

Incorporating the possibility of attaching attributes to variables in a logic programming system has been shown to allow the addition of general constraint solving capabilities to it. This approach is very attractive in that by adding a few primitives any logic programming system can be turned into a generic constraint logic programming system in which constraint solving can be user defined, an...

متن کامل

A New Method for Solving Constraint Satisfaction Problems

Many important problems in Artificial Intelligence can be defined as Constraint Satisfaction Problems (CSP). These types of problems are defined by a limited set of variables, each having a limited domain and a number of Constraints on the values of those variables (these problems are also called Consistent Labeling Problems (CLP), in which “Labeling" means assigning a value to a variable.) Sol...

متن کامل

A New Method for Solving Constraint Satisfaction Problems

Many important problems in Artificial Intelligence can be defined as Constraint Satisfaction Problems (CSP). These types of problems are defined by a limited set of variables, each having a limited domain and a number of Constraints on the values of those variables (these problems are also called Consistent Labeling Problems (CLP), in which “Labeling means assigning a value to a variable.) Solu...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001